<!DOCTYPE html>
<html>
<head>
    <title>考试中心</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <!-- head 中 -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.2/style/weui.min.css">
    <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.0/css/jquery-weui.min.css">
    <link href="../css/main.css" rel="stylesheet" />
</head>
<body>
    <div class="nav">
        <!-- <span onclick="history.go(-1)">
            <img src="../img/arrow-left.png" />
        </span> -->
        <span>考试中心</span>
        <span id="btn-nav">导航</span>
    </div>
    <div class="weui-skin_android" id="androidActionsheet" style="display:none">
        <div class="weui-mask" style="visibility:visible; opacity:0.5"></div>
        <div class="weui-actionsheet">
            <div class="weui-actionsheet__menu">
                <div class="weui-actionsheet__cell" onclick="location.href='index.html'">课程中心</div>
                <!-- <div class="weui-actionsheet__cell" onclick="location.href='map.html'">党建大数据</div>
                <div class="weui-actionsheet__cell" onclick="location.href = 'http://39.104.67.0:8443/ehome/ehome.html'">党群E家</div> -->
                <div class="weui-actionsheet__cell" onclick="location.href='center.html'">考试中心</div>
                <!-- <div class="weui-actionsheet__cell" onclick="location.href='jianguan.html'">驻村云监管</div>
                <div class="weui-actionsheet__cell" onclick="location.href = 'http://39.104.67.0:8443/ehome/personnel.html'">人才直通车</div> -->
                <div class="weui-actionsheet__cell" onclick="location.href='user.html'">个人信息</div>

            </div>
        </div>
    </div>
    <!-- Swiper -->    


    <!-- <div class="panel study">
        <div class="panel-title">
            <span>我的课程</span>
            <a href="centerMore.html" class="more">查看更多</a>
        </div>
        <div class="panel-body">
          <div class="item" onclick="location.href='detail.html'">
              <div class="cover">
                  <img src="../img/kecheng1.png" />                 
              </div>
              <div class="memo">
                  上次播放：12分30秒
              </div>
          </div>
            <div class="item" onclick="location.href='detail.html'">
                <div class="cover">
                    <img src="../img/kecheng2.png" />
                </div>
                <div class="memo">
                    上次播放：12分30秒
                </div>
            </div>
        </div>
    </div> -->
    <div class="panel ">
        <div class="panel-title">
            <span>上课提醒</span>          
        </div>
        <div class="panel-body">
           <div class="card-alert">
               <div class="alert-title">6.12（周二）<span>13:00-14:30</span></div>
               <div class="alert-body">
                   <div class="item">
                       <img src="../img/kecheng3.png" />                   
                       <span>课程：git学习</span>
                   </div>
                   <div class="item">
                       <img src="../img/kecheng31.png" />
                       <span>课程老师：徐怀壮</span>
                   </div>
                   <div class="item">
                       <img src="../img/kecheng32.png" />
                       <span>上课人数：20人</span>
                   </div>
                   <div class="item">
                       <img src="../img/kecheng33.png" />
                       <span>本期内容：学习代码管理工具 git, 更好的管理你的源码</span>
                   </div>
               </div>
           </div>
        </div>
     
        
    </div>

    <!-- <div class="recommed"> -->
      <!-- <div>课程推荐</div>
      <div>
          <img src="../img/search.png" /></div>
    </div> -->

    <!-- <div id="articleList">

    </div> -->
    <!--<div class="weui-flex list study">
        <div class="weui-flex__item">
            <div class="item"  >
                <a class="cover" href="classDetail.html">
                    <img src="../img/item1.png" />
                </a>
                <a class="title" href="detail.html">六枝特区倡导党员快乐</a>
                <div class="comments weui-flex">
                    <div class="star weui-flex__item">
                       鲁宾
                    </div>
                    <div class="users weui-flex__item">
                     
                        <span>57165参加过</span>
                    </div>
                </div>
            </div>

        </div>
        <div class="weui-flex__item">
            <div class="item" >
                <a class="cover" href="detail.html">
                    <img src="../img/item2.png" />
                </a>
                <a class="title" href="detail.html">水城县社区群众的守望者</a>
                <div class="comments weui-flex">
                    <div class="star weui-flex__item">
                      杨洋
                    </div>
                    <div class="users weui-flex__item">
                     
                        <span>57165参加过</span>
                    </div>
                </div>
            </div>
        </div>

    </div>

    <div class="weui-flex list study">
        <div class="weui-flex__item">
            <div class="item"  >
                <a class="cover" href="classDetail.html">
                    <img src="../img/item1.png" />
                </a>
                <a class="title" href="detail.html">六枝特区倡导党员快</a>
                <div class="comments weui-flex">
                    <div class="star weui-flex__item">
                        鲁宾
                    </div>
                    <div class="users weui-flex__item">

                        <span>57165参加过</span>
                    </div>
                </div>
            </div>

        </div>
        <div class="weui-flex__item">
            <div class="item" >
                <a class="cover" href="detail.html">
                    <img src="../img/item2.png" />
                </a>
                <a class="title" href="detail.html">水城县社区群众的守望者</a>
                <div class="comments weui-flex">
                    <div class="star weui-flex__item">
                        杨洋
                    </div>
                    <div class="users weui-flex__item">

                        <span>57165参加过</span>
                    </div>
                </div>
            </div>
        </div>

    </div>-->

    <div class="panel testing ">
        <div class="panel-title">
            <span>考试中心</span>
            <a href="myTestList.html" class="more">我的考试</a>
        </div>
        <div id="exam_list"></div>
    </div>
    <!-- body 最后 -->
    <script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js" type='text/javascript' charset='utf-8'></script>
    <script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/jquery-weui.min.js" type='text/javascript' charset='utf-8'></script>
    <script src="https://g.alicdn.com/dingding/open-develop/1.9.0/dingtalk.js" type='text/javascript' charset='utf-8'></script>
    <!-- mustache.js -->
    <script src="https://cdn.bootcss.com/mustache.js/2.3.0/mustache.min.js" type='text/javascript' charset='utf-8'></script>
  
    <script src="../scripts/main.js"></script>
    <!-- Initialize Swiper -->
    <script>

        var html = '<div class="weui-flex list">{{inner}}</div>';
        var innerHtml = '<div class="weui-flex__item">' +
           ' <div class="item">' +
               '<a class="cover" href="detail2.html?id={{id}}">' +
                    '<img src="{{cover}}" />' +
                '</a>' +
                '<a class="title" href="detail2.html?id={{id}}">{{title}}</a>' +
                '<div class="comments weui-flex">' +
                   ' <div class="star weui-flex__item">' +                      
                       ' {{teacher}}' +
                   ' </div>' +
                    '<div class="users weui-flex__item">' +
                        '<img src="../img/users.png" />' +
                       ' <span>57165</span>' +
                   ' </div>' +
               ' </div>' +
           ' </div>' +
      '  </div>';

        $(function () {

            var typeId = 1;

            $.get("http://localhost:8222/article?type_id=" + typeId, function (rel) {

                var strHtml = [];
                var strInner = [];

                for (var i = 0; i < rel.rows.length; i++) {
                    strInner.push(innerHtml.replace("{{id}}", rel.rows[i].article_id).replace("{{teacher}}", rel.rows[i].teacher).replace("{{id}}", rel.rows[i].article_id).replace("{{cover}}", rel.rows[i].cover).replace("{{title}}", rel.rows[i].title));
                    if (i % 2 == 1 || i == rel.rows.length - 1) {
                        strHtml.push(html.replace("{{inner}}", strInner.join("")));
                        strInner = [];
                    }
                }

                $("#articleList").html(strHtml.join(""));
            });
        });

    </script>
     <script src="../scripts/examList.js"></script>
</body>
</html>
